<meta charset="UTF-8">
<style>

#d1{
	font-size:200px;
       	color:red;
	height:80%;width:80%;
	line-height:600px; 
	text-align:center;
	position:fixed;
	top:0;right:0;bottom:0;left:0;
	margin:auto;
}
</style>
<div id="d1" border = "1"></div>
<script>
    //定时函数
      timer=setInterval(f,1000);
	var i =0;
	var arr = ["10","9","8","7","6","5","4","3","2","1","0"];
    function f(){
	if(i==10){
		d1.innerHTML ="时间到";
		clearInterval(timer);//关闭定时器
	}else{
	 d1.innerHTML =arr[i];
                i++;
	}
            }
  

</script>
